package net.sareweb.acab.entity;

// Generated 13-abr-2010 15:53:20 by Hibernate Tools 3.2.5.Beta

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.validator.NotNull;

/**
 * Evaluation generated by hbm2java
 */
@Entity
@Table(name = "evaluation", catalog = "acab")
public class Evaluation implements java.io.Serializable {

	private Integer idEvaluation;
	private Seat seat;
	private User user;
	private int marks;
	private Date evalDate;

	public Evaluation() {
	}

	public Evaluation(Seat seat, User user, int marks, Date evalDate) {
		this.seat = seat;
		this.user = user;
		this.marks = marks;
		this.evalDate = evalDate;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "idEvaluation", unique = true, nullable = false)
	public Integer getIdEvaluation() {
		return this.idEvaluation;
	}

	public void setIdEvaluation(Integer idEvaluation) {
		this.idEvaluation = idEvaluation;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "seat", nullable = false)
	@NotNull
	public Seat getSeat() {
		return this.seat;
	}

	public void setSeat(Seat seat) {
		this.seat = seat;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "User", nullable = false)
	@NotNull
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "marks", nullable = false)
	public int getMarks() {
		return this.marks;
	}

	public void setMarks(int marks) {
		this.marks = marks;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "evalDate", nullable = false, length = 0)
	@NotNull
	public Date getEvalDate() {
		return this.evalDate;
	}

	public void setEvalDate(Date evalDate) {
		this.evalDate = evalDate;
	}

}
